package cn.zhfeat.core.base;


import cn.zhfeat.core.shiro.ShiroSessionData;

public class BaseDto {
	/** *- **/
	private int pageSize = 10;
	/** 起始页数 **/
	private int startIndex = 1;
	/**
	 *  动态列表排序依据，比如：dto.setOrder("create_time");
	 */
	private String orderBy = null;
	
	/** 用于封装用户登录后所绑定的数据  -ZhangHao */
	private ShiroSessionData shiroSessionData;
	
	public int getStartIndex() {
		if(startIndex == 0) {
			startIndex = 1;
		}
		if(startIndex != 1) {
			startIndex = startIndex / pageSize + 1; 
		}
		return startIndex;
	}
	
	public String getOrderBy() {
		return orderBy;
	}
	public void setOrderBy(String orderBy) {
		this.orderBy = orderBy;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	
	public void setStartIndex(int startIndex) {
		this.startIndex = startIndex;
	}
	public ShiroSessionData getShiroSessionData() {
		return shiroSessionData;
	}
	public void setShiroSessionData(ShiroSessionData shiroSessionData) {
		this.shiroSessionData = shiroSessionData;
	}
	
}
